<?php
namespace app\app\controller;
use \app\app\controller\Base;
use \think\Db;
class LawyerCase extends Base
{
    public function index()
    {
        $where["state"]=["=","1"];
        $type=Request()->param("type");
        if($type!="") $where["type"]=["=",$type];
        $case=Db::name('lawyer_case')->where($where)->order("id","desc")->paginate(6,false,['query'=>request()->Post()]);
		$this->assign("case",$case);
		$this->assign("page",$case->render());
		// var_dump($news->render());
        return $this->fetch();
    }

    //律师详情页
    public function info(){
    	// 新闻
        $case=Db::name('lawyer_case')->where('id',$this->request->param('id'))->find();
        $this->assign('case',$case);
		// var_dump($lawyer);
    	// $this->assign('menu','3');
    	// $this->assign('_title',"新s闻详情");
        return $this->fetch();
    }
	
}
